//
//  StockKlinePriceView.m
//  K线图自治
//
//  Created by LK-IOS on 2017/12/13.
//  Copyright © 2017年 LK-IOS. All rights reserved.
//

#import "StockKlinePriceView.h"
#import "UIColor+StockColorEntension.h"


@implementation StockKlinePriceView


-(UILabel *)maxPriceLabel
{
    if (!_maxPriceLabel)
    {
        _maxPriceLabel = [self createLabel];
        [self addSubview:_maxPriceLabel];
        [_maxPriceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.equalTo(self);
            make.right.equalTo(self).offset(-5);
        }];
    }
    return _maxPriceLabel;
}

-(UILabel *)middlePriceLabel
{
    if (!_middlePriceLabel)
    {
        _middlePriceLabel = [self createLabel];
        [self addSubview:_middlePriceLabel];
        [_middlePriceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.left.equalTo(self);
            make.right.equalTo(self).offset(-5);
        }];
    }
    return _middlePriceLabel;
}

-(UILabel *)minPriceLabel
{
    if (!_minPriceLabel)
    {
        _minPriceLabel = [self createLabel];
        [self addSubview:_minPriceLabel];
        [_minPriceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.left.equalTo(self);
            make.right.equalTo(self).offset(-5);
        }];
    }
    return _minPriceLabel;
}

-(UILabel*)createLabel
{
    UILabel *label = [[UILabel alloc] init];
    label.textColor = [UIColor Stock_TextColor];
    label.font = [UIFont systemFontOfSize:font10ScreenWRate * LKScreenW];
    label.adjustsFontSizeToFitWidth = YES;
    label.textAlignment = NSTextAlignmentLeft;
    label.text = @"---";
    return label;
}


@end
